package sps.admin.module.business.workinghours.dao;

import java.time.LocalDate;
import java.util.List;

import sps.admin.module.business.workinghours.domain.entity.WorkingHoursEntity;
import sps.admin.module.business.workinghours.domain.form.WorkingHoursQueryForm;
import sps.admin.module.business.workinghours.domain.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import sps.admin.module.system.employee.domain.entity.EmployeeEntity;

/**
 * 工时功能 Dao
 *
 * @Author yjg
 * @Date 2024-09-09 11:02:13
 * @Copyright v1.0
 */

@Mapper
@Component
public interface WorkingHoursDao extends BaseMapper<WorkingHoursEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<WorkingHoursVO> queryPage(Page page, @Param("queryForm") WorkingHoursQueryForm queryForm,@Param("departmentIds")List<Long> departmentIds,@Param("checkedMemberNumbers")List<String> checkedMemberNumbers);


    /**
     * 查询导出的数据
     *
     */
    List<WorkingHoursExcelVO> selectExcelExportData(@Param("queryForm") WorkingHoursQueryForm queryForm,@Param("departmentIds")List<Long> departmentIds,@Param("jobNumbers")List<String> jobNumbers);

    /**
     * 查询超时月结导出的数据
     *
     */
    List<WorkingHoursMonthExcelVO> getExcelMonthExportData(@Param("queryForm") WorkingHoursQueryForm queryForm);

    /**
     * 周日PDF预览及导出
     *
     */
    List<WorkingHoursPdfVO> selectPdfDownLoadData(@Param("queryForm") WorkingHoursQueryForm queryForm,@Param("departmentIds")List<Long> departmentIds,@Param("jobNumbers")List<String> jobNumbers);

    /**
     * 周一到周五PDF预览及导出
     *
     */
    List<WorkingHoursPdfOverTimeVO> selectPdfOverTimeData(@Param("queryForm") WorkingHoursQueryForm queryForm,@Param("departmentIds")List<Long> departmentIds,@Param("jobNumbers")List<String> jobNumbers);

    /**
     * 统计月加班数据
     *
     */
    String selectPdfMonthOverTime(@Param("queryForm") WorkingHoursQueryForm queryForm);

    /**
     * 分页 审批查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<WorkingHoursVO> queryAllowPage(Page page, @Param("queryForm") WorkingHoursQueryForm queryForm,@Param("departmentIds")List<Long> departmentIds,@Param("checkedMemberNumbers")List<String> checkedMemberNumbers);

    List<WorkingHoursVO> getWorkingHoursListByNumber(@Param("jobNumber") String jobNumber,@Param("preDay") LocalDate preDay,@Param("currentDay") LocalDate currentDay);
}
